package BC126_小乐乐算多少人被请家长;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = 0;
        int n = sc.nextInt();

        for (int i = 0; i < n; i++){
            int sum = 0;
            for (int j = 0; j < 3; j++){
                sum += sc.nextInt();
            }
            double avg = sum / 3;
            if (avg < 60){
                count++;
            }
        }
        System.out.println(count);
    }
}
